package tools;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import entitybean.oc_friendly_link.EntityBeanOc_Friend_Link;

import view.ViewOc_News;

public class InterfaceNewLinkList {
	public List<EntityBeanOc_Friend_Link> ViewOc_News(ResultSet rs)
	{
		
		List<EntityBeanOc_Friend_Link>list =new ArrayList<EntityBeanOc_Friend_Link>();
		try {
			Integer i=1;
			while(rs.next())
			{
				
				EntityBeanOc_Friend_Link viewoc_news=new EntityBeanOc_Friend_Link();
				viewoc_news.setFriend_link_name(rs.getString("friend_link_name"));
				viewoc_news.setFriend_link_url(rs.getString("friend_link_url"));
				viewoc_news.setSort(rs.getString("sort"));
				viewoc_news.setId(Integer.valueOf(rs.getString("ID")));
				list.add(viewoc_news);
				i=i+1;
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return list;
		
	}
}
